import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
   {
     path: '/',
     redirect:'/login'
   },
   {
     path: '/login',
     name: 'login',
     component: () => import('../views/login/index.vue')
   },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home/index.vue'),
    children: [
      {
        path: '/balance',
        name: 'balance',
        component: () => import('../views/balance')
      },{
        path: '/accounts',
        name: 'accounts',
        component: () => import('../views/accounts')
      },{
        path: '/record',
        name: 'record',
        component: () => import('../views/record')
      },{
        path: '/password',
        name: 'password',
        component: () => import('../views/password')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})



export default router
